package testit;

import org.geotools.toolbox.*;

public class Testit {
	public static void main(String[] arg) throws Exception {
	
		if (arg.length < 7) {
	            System.err.println("Usage: java Testit <input_path> <field_name> <radius> <output_path> <width> <height><manualASP>");
	            System.exit(1);  
	        }
		String input_path=arg[0];
		String field_name=arg[1];
		int radius=Integer.parseInt(arg[2]);
		String output_path=arg[3];
		int width=Integer.parseInt(arg[4]);
		int height=Integer.parseInt(arg[5]);
		boolean manual_asp=Boolean.parseBoolean(arg[6]);
		Shp2HeatMap.execute(input_path, field_name, // filed_name
				radius, // radius ,defalut value =100(pixel)
				output_path,// output path
				null, width, height,manual_asp);
		
//		Csv2ShpByXYZ.execute("data/data3.csv", // input path
//				"data/data3.shp");// output
//		
//		ShpProjection.execute("data/data3.shp", null,// "EPSG:3857",
//				"data/data3_proj.shp");
//
//		Shp2Raster.execute("data/data3_proj.shp", "value", 1000.0,// resolution,
//				"data/data3.tif");
		
//		// csv fiels should be x,y,z (fieldname can be any common field words)
//		// filed names can be : x, y, value
//		Csv2ShpByXYZ.execute("data/FangDaiFenBu_510100_201612.csv", // input path
//				"data/FangDaiFenBu_510100_201612.shp");// output
//////		 in the previouse step, value field was generated no matter what the
//////		 name of original field is, so filed name must be value
//		Shp2HeatMap.execute("data/bj.shp", "value", // filed_name
//				200, // radius ,defalut value =100(pixel)
//				"data/bj.tif",// output path
//				null, 6000, 6000,false);
//		Shp2HeatMap.execute("data/test.shp", "value", // filed_name
//				100, // radius ,defalut value =100(pixel)
//				"data/test.tif",// output path
//				null, 6000, 6000);
////		
////		Csv2ShpByXYZ.execute("data/scale3_n.csv", // input path
////				"data/scale3_n.shp");// output
//////		 in the previouse step, value field was generated no matter what the
//////		 name of original field is, so filed name must be value
////		Shp2HeatMap.execute("data/scale3_n.shp", "value", // filed_name
////				200, // radius ,defalut value =100(pixel)
////				"data/scale3_n.tif",// output path
////				null, 6000, 6000);
////		Csv2ShpByXYZ.execute("data/scale3_p.csv", // input path
////				"data/scale3_p.shp");// output
//////		 in the previouse step, value field was generated no matter what the
//////		 name of original field is, so filed name must be value
////		Shp2HeatMap.execute("data/scale3_p.shp", "value", // filed_name
////				200, // radius ,defalut value =100(pixel)
////				"data/scale3_p.tif",// output path
////				null, 6000, 6000);
//		
////		///////////////////// Rasterize points///////////////////////////////////
//		ShpProjection.execute("data/FangDaiFenBu_510100_201612.shp", null,// "EPSG:3857",
//				"data/FangDaiFenBu_510100_201612_proj.shp");
////
//		Shp2Raster.execute("data/FangDaiFenBu_510100_201612_proj.shp", "value", null,// 200.0,
//				"data/FangDaiFenBu_510100_201612.tif");
////		
////		Csv2ShpByXYZ.execute("data/new_house_su.csv", // input path
////				"data/test2.shp");// output
////		// in the previouse step, value field was generated no matter what the
////		// name of original field is, so filed name must be value
////		Shp2HeatMap.execute("data/test2.shp", "value", // filed_name
////				250, // radius ,defalut value =100(pixel)
////				"data/new_house_su.tif",// output path
////				null, 6000, 6000);
////		Csv2ShpByXYZ.execute("data/new_house_cd.csv", // input path
////				"data/test2.shp");// output
////		// in the previouse step, value field was generated no matter what the
////		// name of original field is, so filed name must be value
////		Shp2HeatMap.execute("data/test2.shp", "value", // filed_name
////				250, // radius ,defalut value =100(pixel)
////				"data/new_house_cd.tif",// output path
////				null, 6000, 6000);
////		Csv2ShpByXYZ.execute("data/second_hand_cd.csv", // input path
////				"data/test2.shp");// output
////		// in the previouse step, value field was generated no matter what the
////		// name of original field is, so filed name must be value
////		Shp2HeatMap.execute("data/test2.shp", "value", // filed_name
////				250, // radius ,defalut value =100(pixel)
////				"data/second_hand_cd.tif",// output path
////				null, 6000, 6000);
////		
////		Csv2ShpByXYZ.execute("data/second_hand_su.csv", // input path
////				"data/test2.shp");// output
////		// in the previouse step, value field was generated no matter what the
////		// name of original field is, so filed name must be value
////		Shp2HeatMap.execute("data/test2.shp", "value", // filed_name
////				250, // radius ,defalut value =100(pixel)
////				"data/second_hand_su.tif",// output path
////				null, 6000, 6000);

	}
	// end main
}
